import Vue from "vue";
import Vuex from "vuex";
import cityModule from "./city";
import detailModule from "./detail";
import ratedModule from "./rated";

Vue.use(Vuex);

const store = new Vuex.Store({
  // state: {},
  // mutations: {},
  // // 数据请求时异步操作  只有actions 里面可以写异步操作
  // actions: {},
  modules: {
    city: cityModule,
    detail: detailModule,
    rated: ratedModule,
  },
});

export default store;
